<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
  <script src="/node_modules/jquery/dist/jquery.min.js"></script>
  <script src="/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
</head>

<body>

  <!--导航条区域  -->
  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
          aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/">黑马博客</a>
      </div>

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

        <!--登录和注册按钮  -->
        <%if(!isLogin){%>
        <div class="navbar-form navbar-right">
          <a href="/user/register" class="btn btn-success">注册</a>
          <a href="/user/login" class="btn btn-primary">登录</a>
        </div>
        <%} else {%>
        <div class="navbar-form navbar-right">
          <a href="" class="btn btn-warning">欢迎
            <strong>
              <%=user.username%></strong>
          </a>
          <a href="/user/logout" class="btn btn-danger">注销</a>
        </div>

        <ul class="nav navbar-nav navbar-right">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">发表
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              <li>
                <a href="/article/add">文章</a>
              </li>
              <li>
                <a href="#">问题</a>
              </li>
            </ul>
          </li>
        </ul>
        <%}%>
      </div>
    </div>
  </nav>


  <h1>文章列表</h1>


  <div class="footer" style="color:#999; font-size:12px; text-align:center;">
    <p>黑马程序员 © 2017</p>
  </div>
</body>

</html>